PR Praktikum aus Computergraphik und digitaler Bildverarbeitung SSe 2007
Martin Knecht, 0326294, martin.knecht#aon.at
Michael Schwärzler, 0325222, michael#schwaerzler.com
Supervisor: Oliver Mattausch

Download AdaptiveSoftshadows.zip (8,48 MB)

Adaptive Softshadows

"Adaptive Softshadows" was developed in the summer semester 2007 for the PR "Praktikum aus Computergraphic und digitaler Bildverarbeitung " at the Technical University of Vienna. It is a software designed to visualize a new adaptive soft shadowing algorithm.

Generating a soft shadow by simply using lots of shadow maps is a computationally expensive task, because the stepsize has to be rather small to omit artifacts. Our algorithm implemented in this demo application uses an upper error bound to decide whether if the space between two shadow map sampling positions should be subdivided again or not. This approach makes it possible to get descent softshadows at low computational costs.

Technical details: The software was developed in C++/DirectX9.

Using the program

Once the program starts, you will see this screen:

Startscreen adaptive softshadows

GUI elements

You can change the following values:

Controls:

Configuration:

You can use the xml file found in “./media/challenges” to build up your own shadow scenes. In the tag <softShadowLight> the Softshadow Light is defined. To add other objects to the scene you can use the <envObject> tag.

SoftshadowLight:

<softShadowLight>
    <position>
      <x>170</x>
      <y>35</y>
      <z>150</z>
    </position>
    <rotation>
      <x>0</x>
      <y>-90</y>
      <z>135</z>
    </rotation>
    <length>10</length>
    <epsilon>0.08</epsilon>
    <mapsize>512</mapsize>
</softShadowLight>

envObject:

<envObject>
    <position>
      <x>145</x>
      <y>0</y>
      <z>150</z>
    </position>
    <rotation>
      <x>90</x>
      <y>90</y>
      <z>0</z>
    </rotation>
    <xfile>./media/models/Wand.x</xfile>
    <id>1</id>
    <fixed>1</fixed>
</envObject>

Application configuration:

To change the size of the window or switch to fullscreen mode, open the file config.xml.